package mspbots.teams.client.core.data.planners;

import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

/**
 * mspbots.teams.client.core.data.planners.TasksController
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/9/29
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("planners/{tenantId}")
public class TasksController {

    private final TasksServiceImpl tasksService;

    @GetMapping("tasks")
    public Flux<ObjectNode> find(@PathVariable Long tenantId) {
        return this.tasksService.find(tenantId);
    }
}
